﻿//新增
var fnCustomAdd = function () {
    SetMaxDWH(YAHOO.example.container.dialog1);
    //debugger
    if (editpageFlag == 0) {
        document.getElementById("EditUIWindow").src = "AutoLoadForm.aspx?r=" + Math.random() + "&entity=" + const_EditEntity;
    }
    else {
        document.getElementById("EditUIWindow").src = "AutoLoadForm.aspx?r=" + Math.random() + "&entity=" + const_EditEntity;
    }
    if (document.getElementById("yui-gen7-button") != null) {
        document.getElementById("yui-gen7-button").style.display = "";
    }
    YAHOO.example.container.dialog1.show();

}

//修改
var fnCustomEdit = function () {
    //if (Y.util.Dom.getViewportHeight() < 401) {
        //alert(Y.util.Dom.getViewportHeight());
     SetMaxDWH(YAHOO.example.container.dialog1);
    //}
    var recordID = myDataTable.getSelectedRows()[0];
    record = myDataTable.getRecord(recordID);
        if (editpageFlag == 0) {
            document.getElementById("EditUIWindow").src = "AutoLoadForm.aspx?r=" + Math.random() + "&entity=" + const_EditEntity + "&id=" + record.getData(const_entityID);
        }
        else {
            document.getElementById("EditUIWindow").src = "AutoLoadForm.aspx?r=" + Math.random() + "&entity=" + const_EditEntity + "&id=" + record.getData(const_entityID);
        }
        if (document.getElementById("yui-gen7-button") != null) {
            document.getElementById("yui-gen7-button").style.display = "";
        }
        YAHOO.example.container.dialog1.show();
}

var fnSetPost = function () {
    //debugger
    var recordID = myDataTable.getSelectedRows()[0];
    record = myDataTable.getRecord(recordID);
    var CityLowerestSalaryID = record.getData("ID");
    //conditonId = "UserID";
    var selectId = "PostID";
    var condition = "CityLowerestSalaryID='" + CityLowerestSalaryID + "'";
    var _btn = document.getElementById("yui-gen7-button");
    if (_btn != null && _btn != undefined) {
        _btn.style.display = "none";
    }
    document.getElementById("EditUIWindow").src = "/Extend/ViewList.aspx?entity=V_salPostCityLowerestSalary&CityID=" + CityLowerestSalaryID + "&condition=" + condition;
    document.getElementById("yui-gen7-button").style.display = "none";
    YAHOO.example.container.dialog1.show();
}

var SelectData = function() {
    //alert($(this).attr("SValue"));
}